<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/mypage.css" />
<title>마이 페이지(회원정보수정)</title>
<script type="text/javascript" src="./js/jquery.validate.js"></script>
<script type="text/javascript" src="./js/modify.validate.js"></script>
<script type="text/javascript">
window.onload=function(){
	$("#delete_btn").click(onDelete_btn);
	function onDelete_btn()
	{
		document.modify_form.action = "deleteUser.do";
		document.modify_form.method = "get";
		document.modify_form.submit();
	}
}
</script>
<style type="text/css">
#modify_form label.error{
    background:url("./images/join/unchecked.gif") no-repeat 0px 0px;
    padding-left: 16px;
    padding-botton: 2px;
    color: #EA5200;
    width: 170px;
    font-size: 11px;
    text-align: left;
}
#modify_form label.checked{
    background:url("./images/join/checked.gif") no-repeat 0px 0px;
}
</style>
</head>
<body>
<div style = "margin-bottom: 20px;">
<img src = "images/login/user_modi_tt.gif"/>
</div>
		<form id="modify_form" name="modify_form" method="post" action="modifyUser.do">
			<div align = "left" id = 'registerFrm' class = "modi_text">
				
				<label for="email" id="email" style = "display: inline-block;">이메일</label>
				<input class = 'textBox' type="text" name="email" id="email" value="${member.email }" readonly="readonly" width="300px"/><p/>

				<label for="user_name" id="user_name">이름</label>
				<input class = 'textBox' type="text" name="user_name" id="user_name" value="${member.user_name }"/><p/>

			    <label for="nick_name" id="nick_name" >닉네임</label>
			    <input class = 'textBox'  type="text" name="nick_name" id="nick_name" value="${member.nick_name }" readonly="readonly"/><p/>

				<label for="user_pw">비밀번호</label>
				<input class = 'textBox' type="password" name="user_pw" id="user_pw" /><p/>

				<label for="confirm_pw" >비밀번호확인</label>
				<input class = 'textBox' type="password" name="confirm_pw" id="confirm_pw" /><p/>

				<label for="mobile">휴대폰 번호</label>
				<input class = 'textBox' type="text" name="mobile" id="mobile" value="${member.mobile }"/><p/>
				
				<label>생년월일</label>
				<select name="year">
				<%int i;%>
				<%int year = Integer.parseInt(request.getAttribute("year").toString());%>
				<%for(i=2013;i>=1950;i--){ %>
				<option value="<%=i %>" <%if(i == year){out.println("selected");} %>><%=i %></option>
				<%} %>
				</select>년
				<select name="month">
				<%int j; %>
				<%int month = Integer.parseInt(request.getAttribute("month").toString()); %>
				<%for(j=1;j<=12;j++){ %>
				<option value="<%=j %>" <%if(j == month){out.println("selected");} %>><%=j %></option>
				<%} %>
				</select>월
				<select name="day">
				<%int k; %>
				<%int day = Integer.parseInt(request.getAttribute("day").toString()); %>
				<%for(k=1;k<=31;k++){ %>
				<option value="<%=k %>" <%if(k == day){out.println("selected");} %>><%=k %></option>
				<%} %>
				</select>일
				<p/>
				<label for="gender" style = "vertical-align: middle;">성별</label>
				<input type="radio" name="gender" value="1" ${man } style = "width: 15px; vertical-align: middle;"/>&nbsp;
				<font face="맑은 고딕"  style = "vertical-align: middle;">남자</font>
				<input type="radio" name="gender" value="2" ${wooman } style = "width: 15px; vertical-align: middle;"/>&nbsp;
				<font face="맑은 고딕"  style = "vertical-align: middle;">여자</font>
				<p/>
				<label>가입 일자</label>
				<input type="text" name="reg_date" value="${reg_date }" disabled="disabled" />
			</div><p/>

			<!-- 하단 버튼 -->
			<div align="left" style = "margin-bottom: 30px;">
			    <input type="submit" value="개인정보수정" class = "modifyBtn" >
			    <input type="button" id="delete_btn" value="회원탈퇴" class = "deleteBtn">				
			</div>
		</form>
</body>
</html>